package com.intramirror.product.entity;

/**
 * Created on 2018/1/30.
 * @author 123
 */
public enum AggregateRuleType {
    MATCH_FROM_ONE(1), MATCH_FROM_TWO(2), MATCH_FROM_EXISTS_SPU(3);

    private Integer ruleType;

    AggregateRuleType(int ruleType) {
        this.ruleType = ruleType;
    }

    public Integer getValue() {
        return ruleType;
    }

    public void setValue(Integer ruleType) {
        this.ruleType = ruleType;
    }

    public static AggregateRuleType valueOf(int value) {
        switch (value) {
        case 1:
            return MATCH_FROM_ONE;
        case 2:
            return MATCH_FROM_TWO;
        case 3:
            return MATCH_FROM_EXISTS_SPU;
        default:
            return null;
        }
    }
}
